package com.xjtu.learn.plan.controller;

import com.xjtu.learn.plan.domain.RegisterReqVO;
import com.xjtu.learn.plan.domain.Result;
import com.xjtu.learn.plan.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    UserService userService;

    @PostMapping("/register")
    public Result register(@RequestBody RegisterReqVO registerReqVO){
        userService.register(registerReqVO);
        return Result.success();
    }

}
